package ui.mainscreen.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import ui.mainscreen.MenuPanel;
import ui.mainscreen.OptionPanel;

/**
 * Слушатель панели опций
 * 
 * @author Anton
 */
public class OptionPanelListener implements ActionListener {

	private OptionPanel option;
	private MenuPanel menuPanel;

	public OptionPanelListener(OptionPanel option, MenuPanel menuPanel) {
		this.option = option;

		this.menuPanel = menuPanel;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		option.setVisible(false);
		menuPanel.menuCreatorButton.setEnabled(true);
		menuPanel.menuLoadButton.setEnabled(true);
		menuPanel.menuNewButton.setEnabled(true);
		menuPanel.menuExitButton.setEnabled(true);
		menuPanel.menuOptionButton.setEnabled(true);

	}
}
